import xadmin
from xadmin import views
from .models import Banner, Nav


class BaseSetting:
    enable_themes = True
    use_bootswatch = True


class GlobalSettings:
    site_title = "路飞学城"
    site_footer = "Lmt"
    menu_style = "accordion"


class BannerModelAdmin:
    list_display = ["name", "orders", "is_show"]


class NavModelAdmin:
    list_display = ["name", "link"]


xadmin.site.register(views.BaseAdminView, BaseSetting)
xadmin.site.register(views.CommAdminView, GlobalSettings)
xadmin.site.register(Banner, BannerModelAdmin)
xadmin.site.register(Nav, NavModelAdmin)
